home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Tele / C / Comet2.1.3.sit / include / q.h < prev    next >
MacBinary  |  1989-10-04  |  4.0 KB  |  [TEXT/????]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: q.h

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Oct 4 15:34:54 1989, modified Wed Oct 4 15:34:54 1989, creator '????', type ASCII, 3467 bytes "q.h" , at 0xe0b 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
0% TrID Sybase iAnywhere database files default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[????]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 03 71 2e 68 00 00 00 | 00 00 00 00 00 00 00 00 |..q.h...|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 3f 3f 3f | 3f 00 00 00 00 00 00 00 |.TEXT???|?.......|
|00000050| 00 00 00 00 00 0d 8b 00 | 00 01 7e a1 50 0b de a1 |........|..~.P...|
|00000060| 50 0b de 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |P.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 28 45 00 00 |........|....(E..|
|00000080| 2f 2a 20 20 43 6f 70 79 | 72 69 67 68 74 20 31 39 |/* Copy|right 19|
|00000090| 38 33 20 62 79 20 74 68 | 65 20 4d 61 73 73 61 63 |83 by th|e Massac|
|000000a0| 68 75 73 65 74 74 73 20 | 49 6e 73 74 69 74 75 74 |husetts |Institut|
|000000b0| 65 20 6f 66 20 54 65 63 | 68 6e 6f 6c 6f 67 79 20 |e of Tec|hnology |
|000000c0| 20 2a 2f 0d 0d 2f 2a 0d | 09 43 6f 70 79 72 69 67 | */../*.|.Copyrig|
|000000d0| 68 74 20 43 6f 72 6e 65 | 6c 6c 20 55 6e 69 76 65 |ht Corne|ll Unive|
|000000e0| 72 73 69 74 79 20 31 39 | 38 36 2e 20 20 41 6c 6c |rsity 19|86. All|
|000000f0| 20 72 69 67 68 74 73 20 | 61 72 65 20 72 65 73 65 | rights |are rese|
|00000100| 72 76 65 64 2e 0d 0d 09 | 41 73 20 6f 66 20 34 2f |rved....|As of 4/|
|00000110| 31 30 2f 38 36 3a 0d 09 | 54 68 69 73 20 73 6f 75 |10/86:..|This sou|
|00000120| 72 63 65 20 66 69 6c 65 | 20 6d 61 79 20 68 61 76 |rce file| may hav|
|00000130| 65 20 6e 6f 20 63 68 61 | 6e 67 65 73 20 66 72 6f |e no cha|nges fro|
|00000140| 6d 20 74 68 65 20 4d 2e | 49 2e 54 20 6f 72 69 67 |m the M.|I.T orig|
|00000150| 69 6e 61 6c 0d 09 6f 74 | 68 65 72 20 74 68 61 6e |inal..ot|her than|
|00000160| 20 74 68 69 73 20 6e 6f | 74 69 63 65 3b 20 62 75 | this no|tice; bu|
|00000170| 74 20 69 74 20 68 61 73 | 20 62 65 65 6e 20 74 65 |t it has| been te|
|00000180| 73 74 65 64 20 61 73 20 | 70 61 72 74 20 6f 66 20 |sted as |part of |
|00000190| 0d 09 43 6f 72 6e 65 6c | 6c 27 73 20 41 7a 74 65 |..Cornel|l's Azte|
|000001a0| 63 2d 43 20 70 6f 72 74 | 2e 20 20 53 65 65 20 6e |c-C port|. See n|
|000001b0| 6f 74 69 63 65 2e 68 0d | 0d 2a 2f 0d 0d 2f 2a 09 |otice.h.|.*/../*.|
|000001c0| 38 2d 31 33 2d 38 36 20 | 4a 6f 68 6e 20 4c 79 6e |8-13-86 |John Lyn|
|000001d0| 6e 20 72 65 6d 6f 76 65 | 20 61 6e 20 65 78 74 72 |n remove| an extr|
|000001e0| 61 20 69 6e 63 72 65 61 | 6d 65 6e 74 20 6f 66 20 |a increa|ment of |
|000001f0| 71 5f 6c 65 6e 20 69 6e | 20 74 68 65 20 6d 61 63 |q_len in| the mac|
|00000200| 72 6f 20 71 5f 61 64 64 | 68 20 2a 2f 0d 2f 2a 20 |ro q_add|h */./* |
|00000210| 31 30 2f 32 34 2f 38 36 | 20 6b 65 76 69 6e 20 63 |10/24/86| kevin c|
|00000220| 68 61 6e 67 65 64 20 30 | 20 74 6f 20 4e 55 4c 4c |hanged 0| to NULL|
|00000230| 20 69 6e 20 70 6f 69 6e | 74 65 72 20 63 6f 6d 70 | in poin|ter comp|
|00000240| 61 72 69 73 6f 6e 73 20 | 2a 2f 0d 0d 2f 2a 20 44 |arisons |*/../* D|
|00000250| 65 66 69 6e 69 74 69 6f | 6e 73 20 66 6f 72 20 67 |efinitio|ns for g|
|00000260| 65 6e 65 72 61 6c 2d 70 | 75 72 70 6f 73 65 20 71 |eneral-p|urpose q|
|00000270| 75 65 75 65 20 6d 61 6e | 69 70 75 6c 61 74 69 6f |ueue man|ipulatio|
|00000280| 6e 20 70 61 63 6b 61 67 | 65 2e 0d 20 20 20 4d 6f |n packag|e.. Mo|
|00000290| 64 69 66 69 65 64 20 66 | 72 6f 6d 20 4c 61 72 72 |dified f|rom Larr|
|000002a0| 79 20 41 6c 6c 65 6e 27 | 73 20 71 75 65 75 65 20 |y Allen'|s queue |
|000002b0| 70 61 63 6b 61 67 65 20 | 66 72 6f 6d 20 43 53 52 |package |from CSR|
|000002c0| 20 55 6e 69 78 20 66 6f | 72 20 54 43 50 20 61 6e | Unix fo|r TCP an|
|000002d0| 64 0d 20 20 20 74 61 73 | 6b 73 2e 20 2a 2f 0d 0d |d. tas|ks. */..|
|000002e0| 23 69 66 6e 64 65 66 09 | 5f 51 44 45 46 0d 0d 23 |#ifndef.|_QDEF..#|
|000002f0| 64 65 66 69 6e 65 20 5f | 51 44 45 46 0d 0d 74 79 |define _|QDEF..ty|
|00000300| 70 65 64 65 66 09 73 74 | 72 75 63 74 09 71 5f 65 |pedef.st|ruct.q_e|
|00000310| 6c 74 09 09 09 2f 2a 20 | 71 75 65 75 65 20 65 6c |lt.../* |queue el|
|00000320| 65 6d 65 6e 74 3a 20 63 | 61 73 74 20 74 6f 20 72 |ement: c|ast to r|
|00000330| 69 67 68 74 20 74 79 70 | 65 20 2a 2f 0d 7b 0d 09 |ight typ|e */.{..|
|00000340| 73 74 72 75 63 74 09 71 | 5f 65 6c 74 09 2a 71 65 |struct.q|_elt.*qe|
|00000350| 5f 6e 65 78 74 3b 09 2f | 2a 20 69 74 27 73 20 6a |_next;./|* it's j|
|00000360| 75 73 74 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |ust a po|inter to|
|00000370| 20 6e 65 78 74 20 65 6c | 74 20 2a 2f 0d 7d 20 2a | next el|t */.} *|
|00000380| 71 5f 65 6c 74 3b 0d 0d | 74 79 70 65 64 65 66 09 |q_elt;..|typedef.|
|00000390| 73 74 72 75 63 74 09 71 | 75 65 75 65 09 7b 09 09 |struct.q|ueue.{..|
|000003a0| 2f 2a 20 71 75 65 75 65 | 20 68 65 61 64 65 72 20 |/* queue| header |
|000003b0| 2a 2f 0d 09 71 5f 65 6c | 74 09 71 5f 68 65 61 64 |*/..q_el|t.q_head|
|000003c0| 3b 09 09 09 09 2f 2a 20 | 66 69 72 73 74 20 65 6c |;..../* |first el|
|000003d0| 65 6d 65 6e 74 20 69 6e | 20 71 75 65 75 65 20 2a |ement in| queue *|
|000003e0| 2f 0d 09 71 5f 65 6c 74 | 09 71 5f 74 61 69 6c 3b |/..q_elt|.q_tail;|
|000003f0| 09 09 09 09 2f 2a 20 6c | 61 73 74 20 65 6c 65 6d |..../* l|ast elem|
|00000400| 65 6e 74 20 69 6e 20 71 | 75 65 75 65 20 2a 2f 0d |ent in q|ueue */.|
|00000410| 09 69 6e 74 09 71 5f 6c | 65 6e 3b 09 09 09 09 09 |.int.q_l|en;.....|
|00000420| 2f 2a 20 6e 75 6d 62 65 | 72 20 6f 66 20 65 6c 65 |/* numbe|r of ele|
|00000430| 6d 65 6e 74 73 20 69 6e | 20 71 75 65 75 65 20 2a |ments in| queue *|
|00000440| 2f 0d 09 69 6e 74 09 71 | 5f 6d 61 78 3b 09 09 09 |/..int.q|_max;...|
|00000450| 09 09 2f 2a 20 6d 61 78 | 69 6d 75 6d 20 6c 65 6e |../* max|imum len|
|00000460| 67 74 68 20 2a 2f 0d 09 | 69 6e 74 09 71 5f 6d 69 |gth */..|int.q_mi|
|00000470| 6e 3b 09 09 09 09 09 20 | 2f 2a 20 6d 69 6e 69 6d |n;..... |/* minim|
|00000480| 75 6d 20 6c 65 6e 67 74 | 68 20 2a 2f 0d 7d 20 71 |um lengt|h */.} q|
|00000490| 75 65 75 65 3b 0d 0d 65 | 78 74 65 72 6e 09 71 5f |ueue;..e|xtern.q_|
|000004a0| 65 6c 74 09 71 5f 64 65 | 71 20 28 29 3b 0d 65 78 |elt.q_de|q ();.ex|
|000004b0| 74 65 72 6e 20 71 75 65 | 75 65 20 2a 71 5f 63 72 |tern que|ue *q_cr|
|000004c0| 65 61 74 65 28 29 3b 0d | 0d 2f 2a 20 54 68 65 20 |eate();.|./* The |
|000004d0| 66 6f 6c 6c 6f 77 69 6e | 67 20 6d 61 63 72 6f 73 |followin|g macros|
|000004e0| 20 69 6d 70 6c 65 6d 65 | 6e 74 20 6d 6f 73 74 20 | impleme|nt most |
|000004f0| 6f 66 20 74 68 65 20 63 | 6f 6d 6d 6f 6e 20 71 75 |of the c|ommon qu|
|00000500| 65 75 65 20 6f 70 65 72 | 61 74 69 6f 6e 73 20 2a |eue oper|ations *|
|00000510| 2f 0d 0d 2f 2a 20 41 64 | 64 20 61 6e 20 65 6c 65 |/../* Ad|d an ele|
|00000520| 6d 65 6e 74 20 74 6f 20 | 74 68 65 20 68 65 61 64 |ment to |the head|
|00000530| 20 6f 66 20 74 68 65 20 | 71 75 65 75 65 20 2a 2f | of the |queue */|
|00000540| 0d 0d 23 64 65 66 69 6e | 65 09 71 5f 61 64 64 68 |..#defin|e.q_addh|
|00000550| 28 71 2c 20 65 6c 74 29 | 20 09 7b 20 5c 0d 09 69 |(q, elt)| .{ \..i|
|00000560| 66 20 28 28 71 29 2d 3e | 71 5f 68 65 61 64 20 3d |f ((q)->|q_head =|
|00000570| 3d 20 4e 55 4c 4c 29 20 | 28 71 29 2d 3e 71 5f 74 |= NULL) |(q)->q_t|
|00000580| 61 69 6c 20 3d 20 28 65 | 6c 74 29 3b 20 5c 0d 09 |ail = (e|lt); \..|
|00000590| 28 65 6c 74 29 2d 3e 71 | 65 5f 6e 65 78 74 20 3d |(elt)->q|e_next =|
|000005a0| 20 28 71 29 2d 3e 71 5f | 68 65 61 64 3b 20 5c 0d | (q)->q_|head; \.|
|000005b0| 09 28 71 29 2d 3e 71 5f | 68 65 61 64 20 3d 20 28 |.(q)->q_|head = (|
|000005c0| 65 6c 74 29 3b 20 5c 0d | 09 69 66 28 2b 2b 28 28 |elt); \.|.if(++((|
|000005d0| 71 29 2d 3e 71 5f 6c 65 | 6e 29 20 3e 20 28 71 29 |q)->q_le|n) > (q)|
|000005e0| 2d 3e 71 5f 6d 61 78 29 | 20 28 71 29 2d 3e 71 5f |->q_max)| (q)->q_|
|000005f0| 6d 61 78 20 3d 20 28 71 | 29 2d 3e 71 5f 6c 65 6e |max = (q|)->q_len|
|00000600| 3b 20 5c 0d 7d 0d 0d 2f | 2a 20 41 64 64 20 61 6e |; \.}../|* Add an|
|00000610| 20 65 6c 65 6d 65 6e 74 | 20 74 6f 20 74 68 65 20 | element| to the |
|00000620| 74 61 69 6c 20 6f 66 20 | 61 20 71 75 65 75 65 20 |tail of |a queue |
|00000630| 2a 2f 0d 0d 23 64 65 66 | 69 6e 65 09 71 5f 61 64 |*/..#def|ine.q_ad|
|00000640| 64 74 28 71 2c 20 65 6c | 74 29 09 7b 20 5c 0d 09 |dt(q, el|t).{ \..|
|00000650| 28 65 6c 74 29 2d 3e 71 | 65 5f 6e 65 78 74 20 3d |(elt)->q|e_next =|
|00000660| 20 4e 55 4c 4c 3b 20 5c | 0d 09 69 66 20 28 28 71 | NULL; \|..if ((q|
|00000670| 29 2d 3e 71 5f 68 65 61 | 64 20 3d 3d 20 4e 55 4c |)->q_hea|d == NUL|
|00000680| 4c 29 20 7b 20 5c 0d 09 | 09 28 71 29 2d 3e 71 5f |L) { \..|.(q)->q_|
|00000690| 68 65 61 64 20 3d 20 28 | 65 6c 74 29 3b 20 5c 0d |head = (|elt); \.|
|000006a0| 09 7d 20 65 6c 73 65 20 | 7b 20 5c 0d 09 09 28 71 |.} else |{ \...(q|
|000006b0| 29 2d 3e 71 5f 74 61 69 | 6c 2d 3e 71 65 5f 6e 65 |)->q_tai|l->qe_ne|
|000006c0| 78 74 20 3d 20 28 65 6c | 74 29 3b 20 5c 0d 09 7d |xt = (el|t); \..}|
|000006d0| 20 5c 0d 09 28 71 29 2d | 3e 71 5f 74 61 69 6c 20 | \..(q)-|>q_tail |
|000006e0| 3d 20 28 65 6c 74 29 3b | 20 5c 0d 09 69 66 28 2b |= (elt);| \..if(+|
|000006f0| 2b 28 28 71 29 2d 3e 71 | 5f 6c 65 6e 29 20 3e 20 |+((q)->q|_len) > |
|00000700| 28 71 29 2d 3e 71 5f 6d | 61 78 29 20 28 71 29 2d |(q)->q_m|ax) (q)-|
|00000710| 3e 71 5f 6d 61 78 20 3d | 20 28 71 29 2d 3e 71 5f |>q_max =| (q)->q_|
|00000720| 6c 65 6e 3b 20 5c 0d 7d | 0d 0d 2f 2a 20 41 64 64 |len; \.}|../* Add|
|00000730| 20 61 6e 20 65 6c 65 6d | 65 6e 74 20 61 66 74 65 | an elem|ent afte|
|00000740| 72 20 61 20 73 70 65 63 | 69 66 69 65 64 20 65 6c |r a spec|ified el|
|00000750| 65 6d 65 6e 74 20 69 6e | 20 74 68 65 20 71 75 65 |ement in| the que|
|00000760| 75 65 2e 20 20 49 66 20 | 70 72 65 76 20 3d 3d 20 |ue. If |prev == |
|00000770| 2a 2f 0d 2f 2a 20 26 71 | 2d 3e 71 5f 68 65 61 64 |*/./* &q|->q_head|
|00000780| 2c 20 63 61 6e 20 62 65 | 20 75 73 65 64 20 74 6f |, can be| used to|
|00000790| 20 61 64 64 20 61 6e 20 | 65 6c 65 6d 65 6e 74 20 | add an |element |
|000007a0| 74 6f 20 74 68 65 20 68 | 65 61 64 20 6f 66 20 74 |to the h|ead of t|
|000007b0| 68 65 20 71 75 65 75 65 | 20 2a 2f 0d 0d 23 64 65 |he queue| */..#de|
|000007c0| 66 69 6e 65 09 71 5f 61 | 64 64 61 28 71 2c 20 70 |fine.q_a|dda(q, p|
|000007d0| 72 65 76 2c 20 6e 65 77 | 29 09 7b 20 5c 0d 09 69 |rev, new|).{ \..i|
|000007e0| 66 20 28 28 71 29 2d 3e | 71 5f 74 61 69 6c 20 3d |f ((q)->|q_tail =|
|000007f0| 3d 20 28 70 72 65 76 29 | 20 7c 7c 20 28 71 29 2d |= (prev)| || (q)-|
|00000800| 3e 71 5f 74 61 69 6c 20 | 3d 3d 20 4e 55 4c 4c 29 |>q_tail |== NULL)|
|00000810| 20 7b 20 5c 0d 09 09 28 | 71 29 2d 3e 71 5f 74 61 | { \...(|q)->q_ta|
|00000820| 69 6c 20 3d 20 28 6e 65 | 77 29 3b 20 5c 0d 09 7d |il = (ne|w); \..}|
|00000830| 20 5c 0d 09 28 6e 65 77 | 29 2d 3e 71 65 5f 6e 65 | \..(new|)->qe_ne|
|00000840| 78 74 20 3d 20 28 70 72 | 65 76 29 2d 3e 71 65 5f |xt = (pr|ev)->qe_|
|00000850| 6e 65 78 74 3b 20 5c 0d | 09 28 70 72 65 76 29 2d |next; \.|.(prev)-|
|00000860| 3e 71 65 5f 6e 65 78 74 | 20 3d 20 28 6e 65 77 29 |>qe_next| = (new)|
|00000870| 3b 20 5c 0d 09 69 66 28 | 2b 2b 28 28 71 29 2d 3e |; \..if(|++((q)->|
|00000880| 71 5f 6c 65 6e 29 20 3e | 20 28 71 29 2d 3e 71 5f |q_len) >| (q)->q_|
|00000890| 6d 61 78 29 20 28 71 29 | 2d 3e 71 5f 6d 61 78 20 |max) (q)|->q_max |
|000008a0| 3d 20 28 71 29 2d 3e 71 | 5f 6c 65 6e 3b 20 5c 0d |= (q)->q|_len; \.|
|000008b0| 7d 0d 0d 23 69 66 64 65 | 66 20 4f 4c 44 4a 55 4e |}..#ifde|f OLDJUN|
|000008c0| 4b 0d 2f 2a 20 41 64 64 | 20 61 6e 20 65 6c 65 6d |K./* Add| an elem|
|000008d0| 65 6e 74 20 62 65 66 6f | 72 65 20 61 20 73 70 65 |ent befo|re a spe|
|000008e0| 63 69 66 69 65 64 20 65 | 6c 65 6d 65 6e 74 20 69 |cified e|lement i|
|000008f0| 6e 20 74 68 65 20 71 75 | 65 75 65 2e 20 20 2a 2f |n the qu|eue. */|
|00000900| 0d 2f 2a 20 69 66 20 68 | 65 61 64 20 69 73 20 4e |./* if h|ead is N|
|00000910| 55 4c 4c 20 6f 72 20 73 | 75 63 63 2c 20 6a 75 73 |ULL or s|ucc, jus|
|00000920| 74 20 70 61 74 63 68 20 | 6e 65 77 20 65 6c 74 20 |t patch |new elt |
|00000930| 72 69 67 68 74 20 69 6e | 20 0d 09 69 66 20 6e 6f |right in| ..if no|
|00000940| 74 2c 20 72 75 6e 20 64 | 6f 77 6e 20 6c 69 73 74 |t, run d|own list|
|00000950| 20 74 6f 20 66 69 6e 64 | 20 70 72 65 76 69 6f 75 | to find| previou|
|00000960| 73 20 65 6c 74 20 61 6e | 64 20 70 61 74 63 68 20 |s elt an|d patch |
|00000970| 69 6e 20 0d 09 72 65 71 | 75 69 72 65 73 20 71 5f |in ..req|uires q_|
|00000980| 65 6c 74 20 74 6d 70 65 | 6c 74 20 74 6f 20 62 65 |elt tmpe|lt to be|
|00000990| 20 64 65 66 69 6e 65 64 | 20 0d 2a 2f 0d 0d 23 64 | defined| .*/..#d|
|000009a0| 65 66 69 6e 65 09 71 5f | 61 64 64 62 28 71 2c 20 |efine.q_|addb(q, |
|000009b0| 73 75 63 63 2c 20 6e 65 | 77 29 09 7b 20 5c 0d 09 |succ, ne|w).{ \..|
|000009c0| 69 66 20 28 28 71 29 2d | 3e 71 5f 68 65 61 64 20 |if ((q)-|>q_head |
|000009d0| 3d 3d 20 4e 55 4c 4c 20 | 7c 7c 20 28 71 29 2d 3e |== NULL ||| (q)->|
|000009e0| 71 5f 68 65 61 64 20 3d | 3d 20 28 73 75 63 63 29 |q_head =|= (succ)|
|000009f0| 20 29 20 7b 20 5c 0d 09 | 09 28 6e 65 77 29 2d 3e | ) { \..|.(new)->|
|00000a00| 71 65 5f 6e 65 78 74 20 | 3d 20 28 71 29 2d 3e 71 |qe_next |= (q)->q|
|00000a10| 5f 68 65 61 64 3b 20 5c | 0d 09 09 69 66 20 28 28 |_head; \|...if ((|
|00000a20| 71 29 2d 3e 71 5f 68 65 | 61 64 20 3d 3d 20 4e 55 |q)->q_he|ad == NU|
|00000a30| 4c 4c 29 20 5c 0d 09 09 | 09 28 71 29 2d 3e 71 5f |LL) \...|.(q)->q_|
|00000a40| 74 61 69 6c 20 3d 20 28 | 6e 65 77 29 3b 20 5c 0d |tail = (|new); \.|
|00000a50| 09 09 28 71 29 2d 3e 71 | 5f 68 65 61 64 20 3d 20 |..(q)->q|_head = |
|00000a60| 28 6e 65 77 29 3b 20 5c | 0d 09 7d 20 5c 0d 09 65 |(new); \|..} \..e|
|00000a70| 6c 73 65 20 7b 20 5c 0d | 09 09 28 6e 65 77 29 2d |lse { \.|..(new)-|
|00000a80| 3e 71 65 5f 6e 65 78 74 | 20 3d 20 28 73 75 63 63 |>qe_next| = (succ|
|00000a90| 29 3b 20 5c 0d 09 09 74 | 6d 70 65 6c 74 20 3d 20 |); \...t|mpelt = |
|00000aa0| 28 71 29 2d 3e 71 5f 68 | 65 61 64 3b 20 5c 0d 09 |(q)->q_h|ead; \..|
|00000ab0| 09 77 68 69 6c 65 20 28 | 74 6d 70 65 6c 74 2d 3e |.while (|tmpelt->|
|00000ac0| 71 65 5f 6e 65 78 74 20 | 21 3d 20 28 73 75 63 63 |qe_next |!= (succ|
|00000ad0| 29 29 20 7b 20 5c 0d 09 | 09 09 74 6d 70 65 6c 74 |)) { \..|..tmpelt|
|00000ae0| 20 3d 20 74 6d 70 65 6c | 74 2d 3e 71 65 5f 6e 65 | = tmpel|t->qe_ne|
|00000af0| 78 74 3b 20 5c 0d 09 09 | 7d 20 5c 0d 09 09 74 6d |xt; \...|} \...tm|
|00000b00| 70 65 6c 74 2d 3e 71 65 | 5f 6e 65 78 74 20 3d 20 |pelt->qe|_next = |
|00000b10| 28 6e 65 77 29 3b 20 5c | 0d 09 7d 20 5c 0d 09 69 |(new); \|..} \..i|
|00000b20| 66 28 2b 2b 28 28 71 29 | 2d 3e 71 5f 6c 65 6e 29 |f(++((q)|->q_len)|
|00000b30| 20 3e 20 28 71 29 2d 3e | 71 5f 6d 61 78 29 20 28 | > (q)->|q_max) (|
|00000b40| 71 29 2d 3e 71 5f 6d 61 | 78 20 3d 20 28 71 29 2d |q)->q_ma|x = (q)-|
|00000b50| 3e 71 5f 6c 65 6e 3b 20 | 5c 0d 7d 0d 0d 23 65 6e |>q_len; |\.}..#en|
|00000b60| 64 69 66 0d 0d 2f 2a 20 | 44 65 6c 65 74 65 20 61 |dif../* |Delete a|
|00000b70| 6e 20 65 6c 65 6d 65 6e | 74 20 66 72 6f 6d 20 61 |n elemen|t from a|
|00000b80| 20 71 75 65 75 65 2c 20 | 67 69 76 65 6e 20 61 20 | queue, |given a |
|00000b90| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 70 |pointer |to the p|
|00000ba0| 72 65 63 65 65 64 69 6e | 67 20 65 6c 65 6d 65 6e |receedin|g elemen|
|00000bb0| 74 20 2a 2f 0d 2f 2a 20 | 57 69 6c 6c 20 64 65 6c |t */./* |Will del|
|00000bc0| 65 74 65 20 74 68 65 20 | 66 69 72 73 74 20 65 6c |ete the |first el|
|00000bd0| 65 6d 65 6e 74 20 69 66 | 20 70 72 65 76 20 3d 3d |ement if| prev ==|
|00000be0| 20 26 71 2d 3e 71 5f 68 | 65 61 64 20 2a 2f 0d 0d | &q->q_h|ead */..|
|00000bf0| 23 64 65 66 69 6e 65 09 | 71 5f 64 65 6c 61 28 71 |#define.|q_dela(q|
|00000c00| 2c 20 65 6c 74 2c 20 70 | 72 65 76 29 09 7b 20 5c |, elt, p|rev).{ \|
|00000c10| 0d 09 69 66 20 28 28 71 | 29 2d 3e 71 5f 74 61 69 |..if ((q|)->q_tai|
|00000c20| 6c 20 3d 3d 20 28 65 6c | 74 29 29 20 7b 20 5c 0d |l == (el|t)) { \.|
|00000c30| 09 09 69 66 20 28 28 71 | 29 2d 3e 71 5f 68 65 61 |..if ((q|)->q_hea|
|00000c40| 64 20 3d 3d 20 28 65 6c | 74 29 29 20 5c 0d 09 09 |d == (el|t)) \...|
|00000c50| 09 28 71 29 2d 3e 71 5f | 74 61 69 6c 20 3d 20 4e |.(q)->q_|tail = N|
|00000c60| 55 4c 4c 3b 20 5c 0d 09 | 09 65 6c 73 65 20 5c 0d |ULL; \..|.else \.|
|00000c70| 09 09 09 28 71 29 2d 3e | 71 5f 74 61 69 6c 20 3d |...(q)->|q_tail =|
|00000c80| 20 28 70 72 65 76 29 3b | 20 5c 0d 09 7d 20 5c 0d | (prev);| \..} \.|
|00000c90| 09 28 70 72 65 76 29 2d | 3e 71 65 5f 6e 65 78 74 |.(prev)-|>qe_next|
|00000ca0| 20 3d 20 28 65 6c 74 29 | 2d 3e 71 65 5f 6e 65 78 | = (elt)|->qe_nex|
|00000cb0| 74 3b 20 5c 0d 09 28 65 | 6c 74 29 2d 3e 71 65 5f |t; \..(e|lt)->qe_|
|00000cc0| 6e 65 78 74 20 3d 20 4e | 55 4c 4c 3b 20 5c 0d 09 |next = N|ULL; \..|
|00000cd0| 69 66 28 2d 2d 28 28 71 | 29 2d 3e 71 5f 6c 65 6e |if(--((q|)->q_len|
|00000ce0| 29 20 3c 20 28 71 29 2d | 3e 71 5f 6d 69 6e 29 20 |) < (q)-|>q_min) |
|00000cf0| 28 71 29 2d 3e 71 5f 6d | 69 6e 20 3d 20 28 71 29 |(q)->q_m|in = (q)|
|00000d00| 2d 3e 71 5f 6c 65 6e 3b | 20 5c 0d 7d 0d 0d 0d 23 |->q_len;| \.}...#|
|00000d10| 64 65 66 69 6e 65 09 61 | 71 5f 61 64 64 74 28 71 |define.a|q_addt(q|
|00000d20| 2c 20 65 6c 74 29 09 7b | 69 6e 74 5f 6f 66 66 28 |, elt).{|int_off(|
|00000d30| 29 3b 20 71 5f 61 64 64 | 74 28 28 71 29 2c 20 28 |); q_add|t((q), (|
|00000d40| 65 6c 74 29 29 3b 20 69 | 6e 74 5f 6f 6e 28 29 3b |elt)); i|nt_on();|
|00000d50| 20 7d 0d 23 64 65 66 69 | 6e 65 09 61 71 5f 61 64 | }.#defi|ne.aq_ad|
|00000d60| 64 68 28 71 2c 20 65 6c | 74 29 09 7b 69 6e 74 5f |dh(q, el|t).{int_|
|00000d70| 6f 66 66 28 29 3b 20 71 | 5f 61 64 64 68 28 28 71 |off(); q|_addh((q|
|00000d80| 29 2c 20 28 65 6c 74 29 | 29 3b 20 69 6e 74 5f 6f |), (elt)|); int_o|
|00000d90| 6e 28 29 3b 20 7d 0d 23 | 64 65 66 69 6e 65 09 61 |n(); }.#|define.a|
|00000da0| 71 5f 61 64 64 62 28 71 | 2c 20 6f 65 6c 74 2c 20 |q_addb(q|, oelt, |
|00000db0| 6e 65 6c 74 29 09 7b 69 | 6e 74 5f 6f 66 66 28 29 |nelt).{i|nt_off()|
|00000dc0| 3b 20 71 5f 61 64 64 62 | 28 28 71 29 2c 20 28 6f |; q_addb|((q), (o|
|00000dd0| 65 6c 74 29 2c 20 28 6e | 65 6c 74 29 29 3b 20 69 |elt), (n|elt)); i|
|00000de0| 6e 74 5f 6f 6e 28 29 3b | 20 7d 0d 0d 65 78 74 65 |nt_on();| }..exte|
|00000df0| 72 6e 20 71 5f 65 6c 74 | 20 61 71 5f 64 65 71 28 |rn q_elt| aq_deq(|
|00000e00| 29 3b 0d 0d 23 65 6e 64 | 69 66 0d 00 00 00 00 00 |);..#end|if......|
|00000e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e80| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000e90| 6e 65 78 74 3b 20 5c 0d | 09 28 65 6c 74 29 2d 3e |next; \.|.(elt)->|
|00000ea0| 71 65 5f 6e 65 78 74 20 | 3d 20 4e 55 4c 4c 3b 20 |qe_next |= NULL; |
|00000eb0| 03 71 2e 68 02 00 00 00 | 50 61 72 74 53 49 54 78 |.q.h....|PartSITx|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 01 8c 0e 00 00 00 00 |........|........|
|00000ed0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 a9 8d 3a 85 00 00 | 00 00 00 00 01 7e 64 64 |....:...|.....~dd|
|00000f00| 74 28 71 2c 20 65 6c 74 | 29 09 7b 69 6e 74 5f 6f |t(q, elt|).{int_o|
|00000f10| 66 66 28 29 3b 20 71 5f | 61 64 64 74 28 28 71 29 |ff(); q_|addt((q)|
|00000f20| 2c 20 28 65 6c 74 29 29 | 3b 20 69 6e 74 5f 6f 6e |, (elt))|; int_on|
|00000f30| 28 29 3b 20 7d 0d 23 64 | 65 66 69 6e 65 09 61 71 |(); }.#d|efine.aq|
|00000f40| 5f 61 64 64 68 28 71 2c | 20 65 6c 74 29 09 7b 69 |_addh(q,| elt).{i|
|00000f50| 6e 74 5f 6f 66 66 28 29 | 3b 20 71 5f 61 64 64 68 |nt_off()|; q_addh|
|00000f60| 28 28 71 29 2c 20 28 65 | 6c 74 29 29 3b 20 69 6e |((q), (e|lt)); in|
|00000f70| 74 5f 6f 6e 28 29 3b 20 | 7d 0d 23 64 65 66 69 6e |t_on(); |}.#defin|
|00000f80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 06 | 00 04 00 29 00 02 01 85 |........|...)....|
|00000fb0| 02 02 00 29 00 02 01 85 | 02 02 a1 4f c5 8e 00 00 |...)....|...O....|
|00000fc0| 0d 20 00 00 0d 26 00 00 | 0b 91 01 00 00 00 01 00 |. ...&..|........|
|00000fd0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 08 49 d4 |...L...L|...2..I.|
|00000fe0| 03 ae 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00000ff0| 00 0a 03 ed ff ff 00 00 | 00 00 00 09 82 e0 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+